package com.genius.service.impl;

import com.genius.mapper.OperationLogMapper;
import com.genius.monitor.pojo.OperationLog;
import com.genius.service.OperationLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Slf4j
@Service
public class OperationLogServiceImpl implements OperationLogService {

    @Autowired
    private OperationLogMapper operationLogMapper;

    @Override
    @Transactional
    public int insertOperationLog(OperationLog operationLog) {
        return operationLogMapper.insertOperationLog(operationLog);
    }

    @Override
    public List<OperationLog> selectOperationLogByPage(OperationLog operationLog) {
        return operationLogMapper.selectOperationLogByPage(operationLog);
    }

    @Override
    @Transactional
    public int deleteOperationLogByIds(Long[] ids) {
        return operationLogMapper.deleteOperationLogByIds(ids);
    }
}
